import Vue from 'vue'
import VueRouter from 'vue-router'
import RegisterNow from '../views/RegisterNow.vue'
import Layout from '../views/Layout.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'RegisterNow',
    component: RegisterNow
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue')
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import('../views/Register.vue')
  },
  {
    path: '/layout',
    name: 'Layout',
    component: Layout,
    redirect:'/home',
    children:[
      //子路由数组
      {
        path: '/home',
        name: 'Home',
        component: () => import('../views/Home.vue')
      }, 
      {
        path: '/dropinbox',
        name: 'DropInBox',
        component: () => import('../views/DropInBox.vue')
      },
      {
        path: '/personinfomation',
        name: 'PersonInfomation',
        component: () => import('../views/PersonInfomation.vue')
      },
      {
        path: '/occupationdetails',
        name: 'OccupationDetails',
        component: () => import('../views/OccupationDetails.vue')
      },
      {
        path: '/interviewappraisal',
        name: 'InterviewAppraisal',
        component: () => import('../views/InterviewAppraisal.vue')
      },
    ]
  },

  {
    path: '/infomation',
    name: 'Infomation',
    component: () => import('../views/infomation/Infomation.vue')
  },
  {
    path: '/infomation2',
    name: 'Infomation2',
    component: () => import('../views/infomation/Infomation2.vue')
  },
  {
    path: '/infomation3',
    name: 'Infomation3',
    component: () => import('../views/infomation/Infomation3.vue')
  },
  {
    path: '/infomation4',
    name: 'Infomation4',
    component: () => import('../views/infomation/Infomation4.vue')
  },



]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
